<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/runkings.css" />
		<link rel="stylesheet" type="text/css" href="css/icons-extra.css" />

	</head>

	<body id='zbody'>
		<script src="js/mui.min.js"></script>

		<div class='head'>
			<a><span id='back' class="mui-action-back mui-icon mui-icon-back"></span></a>
			<span id='runkings'>排行榜</span>
		</div>
		<div class="img">

			 <div>
		 	
		 	<!--<div class="ranking" style="width: 33.33333333333333%;float: left;">
		   	 <img class="pictures" src="img/cbd.jpg" style="width:100% ;" />
		   	 <div class="categorys" style="font-size: 12px;">分类</div>
		   	 <div class="comicsNames" style="font-size: 15px;">漫画名</div>
		   	 <div class="categorys1" style="margin-top: 10px;">
		   	 	<span class="mui-icon-extra mui-icon-extra-like"  style="margin-top: 4px;font-size: 10px;float: left;color: limegreen;">
		   	 		
		   	 	</span><div class="easylikes" style="color:limegreen;font-size: 10px;margin-top: 10px;">点赞数</div></div>-->
		  </div>
       
		      
		</div>
		<script src="js/url.js"></script>
		<script src="js/jquery.min.js"></script>
		<script>
			/*
						 如果你要用jQuery必须将下面这行代码放在第一行，然后将$符号换成jQuery
						 * */
			$.noConflict();
			var div = document.getElementsByClassName('img')[0];
			jQuery.ajax({
				type: 'post',
				url: serverip.ip + '/discover/rankings',
				dataType: 'json',
				success: function(data) {
					div.innerHTML=null;
					for(var i = 0; i < data.length; i++) {
						var content = document.createElement('div');
						content.innerHTML = '<div class="ranking" style="width: 33.33333333333333%;float: left;">'+
		   	 '<img class="pictures" src="'+serverip.ip2+data[i].id+'/'+data[i].icon+'" style="width:100%;height:125px" />'+
		   	 '<div class="categorys" style="font-size: 12px;">'+data[i].category+'</div>'+
		   	 '<div class="comicsNames" style="font-size: 13px;">'+data[i].comicsname+'</div>'+
		   	 '<div class="categorys1" style="margin-top: 10px;">'+
		   	 '<span class="mui-icon-extra mui-icon-extra-like"  style="margin-top: 4px;font-size: 10px;float: left;color: limegreen;">'+
		   	 '</span><div class="easylikes" style="color:limegreen; font-size: 10px;margin:10px">'+data[i].easyLike+'</div></div></div>' +
							'<div class="comicsid" style="display:none;">' + data[i].id + '</div>';
							
						div.appendChild(content);
					}

					jQuery(".ranking").bind("tap", function() {
						var id = jQuery(this).find('.comicsid:first').text();
						mui.openWindow({
							url: 'commandComics.html',
							extras: {
								'comicsid': id
							}
						})
					});
				}
			});
		</script>

		<script type="text/javascript">
			mui.init()
		</script>
	</body>

</html>